package com.second.order.controller;

import com.second.common.pojo.Teacher;
import com.second.common.vo.Result;
import com.second.order.service.TeacherService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: second
 * @description:
 * @author: 胡萌
 * @create: 2023-05-27 14:13
 **/
@RestController
@RequestMapping("/order/teacher")
@Api(tags = "讲师接口类")
public class TeacherController {

    @Autowired
    private TeacherService teacherService;


    @ApiOperation("讲师信息查询")
    @PostMapping("/queryAllTeacherBYTeacherName/{teacherName}")
    public Result queryAllTeacherBYTeacherName(@PathVariable String teacherName){
        Teacher teacher = teacherService.queryAllTeacherBYTeacherName(teacherName);

        return Result.success(teacher);
    }
}
